<%-- 
    Document   : register
    Created on : Oct 22, 2013, 7:18:32 PM
    Author     : Tùng
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <link type="text/css" href="css/reg.css" rel="stylesheet">
        <link type="text/css" href="css/bootstrap.css" rel="stylesheet">
        <link type="text/css" href="css/index.css" rel="stylesheet">
        <link type="text/css" href="css/table.css" rel="stylesheet">
        <script type="text/javascript" src="js/table.js"></script>
        <script type="text/javascript" src="js/modernizr.min.js"></script>
        <script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.10.3.custom.min.js"></script>
        <script type="text/javascript" src="js/raphael-min.js"></script>
        <script type="text/javascript" src="js/underscore-min.js"></script>
        <script type="text/javascript" src="js/backbone-min.js"></script>
        <script type="text/javascript" src="js/bootstrap.min.js"></script>
        <script type="text/javascript" src="js/transition.js"></script>
        <script type="text/javascript" src="js/home.js"></script>
        <title>Register Page</title>
        <c:if test="${not empty sessionScope.ACCOUNT}">
            <c:redirect url="home.jsp"/>
        </c:if>
    </head>
    <body>
        <div id="main1">
            <div id="fixed-header" class="navbar-fixed-top row">
                <div id="menu" class="row">
                    <div id="menu-inner">
                        <div id="messages"></div>
                        <div id="menu-left" class="col-5">
                            <div id="dd-left" class="col-1 text-left">
                                <a data-toggle="dropdown" style="margin-top:20px" class="btn btn-disabled dropdown-toggle"><i class="icon-menu"></i></a>
                                <ul aria-labelledby="dLabel" role="menu" class="dropdown-menu">
                                    <li class="caret-up"></li>
                                    <li><a href="home.jsp#features">How It Works</a></li>
                                    <li><a href="index.jsp">Search Products</a></li>
                                    <li><a href="FeedbackController?btAction=ShowFeedback">Feedback</a></li>
                                    <li><a href="register.jsp">Sign Up</a></li>
                                    <li>______________________</li>
                                    <li><a href="login.jsp">Login</a></li>
                                </ul>
                            </div>
                            <div class="col-2 hiw">
                                <a href="home.jsp">Home</a>
                            </div>
                        </div>
                        <div class="col-2 text-center">
                            <img src="Images/PRTS.png" style="height: 80px"/>
                        </div>
                        <div id="menu-right" class="col-5">
                            <div id="dd-right">
                                <a href="login.jsp">
                                    Login
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div id="content-wrapper" style="margin-top: 100px;">
                <div class="row products private-finds">
                    <div class="grid-container" style="width: 95%">
                        <ul class="col-12 grid-view" style="width:100%">
                            &nbsp;&nbsp;&nbsp;&nbsp;<font color="red" size="20">${REGISTERFAIL} ${CHECKPASSWORDFAIL} ${DUPLICATEEMAIL}</font>
                            <form method="post" action="LoginSignup">
                                <table class="example table-hover">
                                    <thead>
                                        <tr align="center">
                                            <th colspan="2" align="center"> Register Form</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td width="350">Email<font color="red">*</font></td>
                                            <td width="750"><input type="text" placeholder="Email Address" name="txtRegisterEmailAddress" maxlength="75" id="id_email" required /></td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>Example: capstonePRTS@gmail.com....</td>
                                        </tr>
                                        <tr>
                                            <td>Full name<font color="red">*</font></td>
                                            <td><input type="text" placeholder="Full name" name="txtRegisterUsername" required /></td>
                                        </tr>
                                        <tr>
                                            <td>Password<font color="red">*</font></td>
                                            <td><input type="password" placeholder="Password" name="txtRegisterPassword" id="txtRegisterPassword" required /></td>
                                        </tr>
                                        <tr>
                                            <td>Re-Password<font color="red">*</font></td>
                                            <td><input type="password" placeholder="Confirm Password" id="txtRegisterRePassword" required /></td>
                                        </tr>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <td colspan="2"><textarea disabled="disabled" rows="8">This privacy policy applies to your use of the PRTS and is intended to provide you with information on how we collect, use and store the information that you provide to us so that you can make appropriate choices regarding sharing information with us. From time to time, we may add new websites, services and applications, but will provide a link to this privacy policy or the applicable privacy policy. If you do not agree to this privacy policy, please do not use our websites or services and do not install or use our applications.
If you have any questions, complaints or comments regarding our online or offline privacy policies, please contact SNEI's Consumer Services Hotline at 855-999-PRTS (7669). Additional contact information is provided below.
You will receive email when tracked product meets your desired price and an email at weekend. You can refuse receiving email after logged in.
                                                </textarea><br/>
                                                <input type="checkbox" required/>&nbsp;&nbsp;I agree to allow my personal information to be shared with PRTS® for marketing purposes</td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" align="center">
                                                <button name="action" type="submit" class="btn-large" value="Register"
                                                        onclick="if ((txtRegisterPassword.value.length < 7) || (txtRegisterPassword.value.length >15)) {
                                                            alert('Password must have length from 7 to 15 characters');
                                                            return false;
                                                        }
                                                        if ((txtRegisterRePassword.value.length < 7) || (txtRegisterRePassword.value.length >15)) {
                                                            alert('Confirm Password must have length from 7 to 15 characters');
                                                            return false;
                                                        }
                                                        if (txtRegisterPassword.value != txtRegisterRePassword.value) {
                                                            alert('The enetered passwords do not match!!!');
                                                            return false;
                                                        }
                                                        var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
                                                        if (!filter.test(id_email.value)) {
                                                            alert('Invalid email address!! Example: capstonePRTS@gmail.com....');
                                                            return false;
                                                        }">Register</button>

                                                <button name="action" type="reset" class="btn-large" value="Clear"
                                                        >&nbsp;&nbsp;&nbsp;Clear&nbsp;&nbsp;&nbsp;</button>
                                            </td>
                                        </tr>
                                    </tfoot>
                                </table>
                            </form>

                        </ul>
                    </div>
                </div>
            </div>



        </div>
    </body>
</html>
